package com.aisile.admin.config;

import lombok.extern.slf4j.Slf4j;
import lombok.extern.slf4j.XSlf4j;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @Auther:yry
 * @Date:2024/4/24 0024
 * @VERSON:1.0
 */
@Aspect  // 开启切面编程 让项目加载切面的注解
@Slf4j
@Component
public class ExceptionWorkerAspect {

    @AfterThrowing(throwing = "e",pointcut = "execution(* com.aisile.admin.controller.v1.*.*(..))")
    public void doExceptionWorker(Throwable e){
        //log.info("有异常",e);
        //System.out.println("---进入了异常处理方法了！---");
        //e.printStackTrace();
    }

}
